package com.myproject.error;

import java.util.HashMap;
import java.util.Map;

public class Test2 {

    //OutOfMemoryError
    public static void main(String[] args) {
        Map<Integer,byte[]> map = new HashMap<>();
        for (int i = 0; i < 1000; i++) {
            map.put(i,new byte[40*1024*1024]);
        }
    }
}
